#ifndef __Projet_A2014__ClientSocket__
#define __Projet_A2014__ClientSocket__

#include <winsock2.h>
#include <iostream>
#include <algorithm>
#include <strstream>
#include <vector>

//Buffer Length 
#define MAX_BUFFER_LEN 256

class ClientSocket  //To store and manage client related information
{
private:
	int               m_nTotalBytes;
	int               m_nSentBytes;
	SOCKET            m_Socket;  //accepted socket
	char              m_szBuffer[MAX_BUFFER_LEN];
	ClientSocket	 *m_pNext; //this will be a singly linked list
	

public:
	//Constructor
	ClientSocket();

	//destructor
	~ClientSocket();

	//Get/Set calls
	void SetTotalBytes(int n);
	int GetTotalBytes();
	void SetSentBytes(int n);
	void IncrSentBytes(int n);
	int GetSentBytes();
	void SetSocket(SOCKET s);
	SOCKET GetSocket();
	void SetBuffer(const char *szBuffer);
	void GetBuffer(char *szBuffer);
	char* GetBuffer();
	void ZeroBuffer();
	ClientSocket* GetNext();
	void SetNext(ClientSocket *pNext);
	void CloseSocket();

	std::vector<std::string> candidats_;
	std::string ip;
	double port;


private:
	

};

#endif /* defined(__Projet_A2014__ClientSocket__) */
